<?php
namespace App\Models;
use Carbon\Carbon;
use App\Models\BaseModel;
use App\Helpers\MoneyHelper;
use App\Format\BaseFormat;

/**
 * App\Models\AdminLog
 *
 * @property int $id 管理员操作日志表
 * @property string $name 操作名称
 * @property string $uri 请求链接
 * @property string $desc 操作描述
 * @property string $params 请求参数, 存json
 * @property string $method 请求方式
 * @property int $res_code 返回状态码
 * @property string $res_msg 返回错误信息
 * @property string $res_content 返回信息
 * @property int $admin_id 操作人id
 * @property string $ip_address 操作人ip
 * @property int $start_time 请求开始时间，存毫秒时间戳
 * @property int $end_time 请求结束时间，存毫秒时间戳
 * @property int $con_time 请求消耗的时间，毫秒
 * @property string $created_at
 * @property string $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog apiBaseQuery($whereParams = [])
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog bgBaseQuery($whereParams = [])
 * @method static \Illuminate\Database\Eloquent\Builder|BaseModel deleteNot()
 * @method static \Illuminate\Database\Eloquent\Builder|BaseModel enableYes()
 * @method static \Illuminate\Database\Eloquent\Builder|BaseModel findById(bool $id, bool $throw = true)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog query()
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereAdminId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereConTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereDesc($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereEndTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BaseModel whereIds($ids = [])
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereIpAddress($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereMethod($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereParams($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereResCode($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereResContent($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereResMsg($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereStartTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|AdminLog whereUri($value)
 * @mixin \Eloquent
 */
class AdminLog extends BaseModel
{
    /**
     * Define table name
     *
     * @var string
     */
    protected $table = 'admin_logs';

    /**
     * Define a primary key
     *
     * @var string
     */
    protected $primaryKey = 'id';

    /**
     * Define the table field information
     *
     * @var array
     */
     protected $fillable = [
			'id',
			'name',
			'uri',
			'desc',
			'params',
			'method',
			'res_code',
			'res_msg',
			'res_content',
			'admin_id',
			'ip_address',
			'start_time',
			'end_time',
			'con_time',
			'created_at',
			'updated_at',
		];

    /**
     * Define the table field information
     *
     * @var array
     */
    public $whereSymbols = [
			'id' => '=',
			'name' => 'like',
			'uri' => 'like',
			'desc' => 'like',
			'params' => 'like',
			'method' => 'like',
			'res_code' => '=',
			'res_msg' => 'like',
			'res_content' => 'like',
			'admin_id' => '=',
			'ip_address' => 'like',
			'start_time' => '=',
			'end_time' => '=',
			'con_time' => '=',
		];

    /**
     * A property that cannot be batched.
     *
     * @var array
     */
    protected $guarded = ['id'];
    protected $hidden = ['updated_at'];
    /*********************************************属性格式化***************************************************************/
    
    /*********************************************设置属性***************************************************************/
    
    /*********************************************模型操作***************************************************************/
    public function scopeBgBaseQuery($query, $whereParams = []) {
    }
    public function scopeApiBaseQuery($query, $whereParams = []) {
    }
    /*********************************************模型关联***************************************************************/

}